function play(img, len, handles)
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% show the film on the UI
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

temp = img;
low = 0.0;
high = 1.0;

if get(handles.radiobutton1, 'value')
	smoothing = 0;
elseif get(handles.radiobutton2, 'value')
	smoothing = 1;
elseif get(handles.radiobutton3, 'value')
	smoothing = 2;
end

if get(handles.radiobutton4, 'value')
	enhancement = 0;
elseif get(handles.radiobutton5, 'value')
	enhancement = 1;
elseif get(handles.radiobutton6, 'value')
	enhancement = 2;
elseif get(handles.radiobutton7, 'value')
	enhancement = -1;
end

if get(handles.radiobutton10, 'value')
	processing = 0;
elseif get(handles.radiobutton9, 'value')
	processing = 1;
elseif get(handles.radiobutton8, 'value')
	processing = 2;
end


%%%%%%%%%%%%%Smoothing%%%%%%%%%%%%%
if smoothing == 0
	h = ones(1,1);
elseif smoothing == 1
	h = fspecial('gaussian',[5,5],1);
elseif smoothing == 2
	h = ones(5,5)/25;
end

for i = 1:len
   temp(:,:,i) = imfilter(temp(:,:,i), h, 'conv'); 
end

t1 = temp(:,:,1);

if enhancement == 0
	low = min(min(min(temp)));
	high = max(max(max(temp)));
elseif enhancement == 1
	for i = 1:len
		temp(:, :, i) = imadjust(temp(:, :, i));
	end
elseif enhancement == 2
	scale = 1 / max(max(max(temp)));
	temp = temp * scale;
end

if processing == 1
	for i = 1:len
		x = temp(:,:,i);
		level = mean2(temp(:,:,i));
		mask = (temp(:,:,i) > level);
		temp(:,:,i) = bwmorph(mask,'erode');
		%temp(:,:,i) = mask;
	end
elseif processing == 2
	for i = 1:len
		edgeimg = edge(temp(:,:,i), 'canny');
		temp(:,:,i) = edgeimg;
	end
end


for i = 1:len
	axes(handles.axes1);
	imshow(temp(:,:,i), [low, high]);
end